﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesGLApp.DAL.MesDB
{
    [Serializable]
    [Table("mes_log")]
    public class MesLog
    {
        /// <summary>
        /// id，主键，自增长
        /// </summary>
        [Column("id"),Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }


        /// <summary>
        /// 修改的资料表名
        /// </summary>
        [Column("table_name")]
        public string TableName { get; set; }

        /// <summary>
        /// 修改的记录ID
        /// </summary>
        [Column("table_id")]
        public int TableID { get; set; }

        /// <summary>
        /// 操作之前的值
        /// </summary>
        [Column("before_data")]
        public string BeforeData { get; set; }

        /// <summary>
        /// 操作之后的值
        /// </summary>
        [Column("after_data")]
        public string AfterData { get; set; }

        /// <summary>
        /// 修改类型，暂时只有update和delete两种
        /// </summary>
        [Column("change_type")]
        public string ChangeType { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [Column("change_user")]
        public string ChangeUser { get; set; }

        /// <summary>
        /// 修改日期
        /// </summary>
        [Column("change_date")]
        public DateTime ChangeDate { get; set; }
    }
}
